home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950329-19950528 / 000157_news@columbia.edu_Mon Apr 17 17:53:26 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  7KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA06559
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Mon, 17 Apr 1995 13:53:51 -0400
  3. Received: by apakabar.cc.columbia.edu id AA16342
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Mon, 17 Apr 1995 13:53:48 -0400
  5. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  6. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  7. Newsgroups: comp.protocols.kermit.misc,comp.dcom.modems
  8. Subject: Dataport Dialing Script for MS-DOS Kermit
  9. Date: 17 Apr 1995 17:53:26 GMT
  10. Organization: Columbia University
  11. Lines: 159
  12. Message-Id: <3mu9um$ftc@apakabar.cc.columbia.edu>
  13. Nntp-Posting-Host: watsun.cc.columbia.edu
  14. Keywords: Kermit, Dataport
  15. Xref: news.columbia.edu comp.protocols.kermit.misc:2524 comp.dcom.modems:88816
  16. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  17.  
  18.  
  19. Some people have complained about the Dataport 14400 dialing script
  20. that is distributed with MS-DOS Kermit, saying that it fails to work
  21. because some of the commands are illegal.  We had a Dataport here
  22. briefly for testing a year (or two?) ago, and it was OK then (I think
  23. :-).  So either my memory is faulty, or new Dataport models have a
  24. different command set.  In any case, with the help of Mike Walsh at
  25. Cal State U at Dominguez Hills, we've got a new dialing script for
  26. the Dataport Express (which is, perhaps, the postulated new model?)
  27. that seems to work.  It is enclosed below.
  28.  
  29. I have two questions for Dataport users:
  30.  
  31.  1. Does it work with the Dataport Express?  Meaning, not only does
  32.     it not get errors, but does it indeed set up a high-speed,
  33.     error-corrected, data-compressing, hardware-flow-controlled,
  34.     BREAK-transparent connection?
  35.  
  36.  2. If so, does it also work with the old (original?) Dataport
  37.     model(s)?
  38.  
  39. Please report by email to kermit@columbia.edu.  Thanks!
  40.  
  41. - Frank
  42.  
  43. ---(cut here)---
  44. ; FILE DPXPRESS.SCR (MSMDPXR.SCR)
  45. ; An MS-DOS Kermit script program for dialing the AT&T / Paradyne Dataport
  46. ; Express modem, internal or external, to be used with MS-DOS Kermit 3.12 or
  47. ; later.  The modem is set for V.32bis, compression, error correction, all
  48. ; types of fallback, RTS/CTS flow control, fixed interface speed of 57600.
  49. ; Rename this file to DPXPRESS.SCR if necessary.
  50. ;
  51. ; To use: SET MODEM DPXPRESS (in MS-DOS Kermit 3.14 or later)
  52. ;  or:    DEFINE _MODEM DPXPRESS (in Kermit 3.13 and earlier)
  53. ; and:    Make sure Kermit executes the standard MSKERMIT.INI file.
  54. ;
  55. ; Authors: Christine M. Gianone, Frank da Cruz; Columbia U, September 1993
  56. ; Revised Oct 94.
  57. ; Adapted to Dataport Express from DATAPORT.SCR, Apr 95.
  58. ;
  59. def errfail echo \%1, hangup, goto fail ; Macro to handle failures.
  60. if < VERSION 312 errfail {MS-DOS Kermit 3.12 or later required.}
  61.  
  62. define chkerr if fail stop 1 \%1
  63. define chkok input 3 OK, if fail stop 1 \%1
  64.  
  65. set input echo on        ; So we can watch what happens.
  66. set input timeout proceed       ; Allow IF SUCCESS, IF FAILURE.
  67. set input case ignore        ; Use caseless string comparisons
  68.  
  69. set parity none            ; Avoid parity foulups
  70. set flow none            ; Avoid flow control deadlocks
  71. hangup                ; Begin by dropping DTR
  72.  
  73. ; Speed.  Don't worry about modem, it autobauds up to 57600 bps.
  74. ; NOTE: This modem doesn't seem to have a command for locking the
  75. ; interface speed.  But it seems to do it anyway.
  76. ;
  77. set speed 57600
  78. wait 5 dsr            ; Time to recover from HANGUP...
  79.  
  80. echo Configuring AT&T DataPort Express on \v(line).
  81.  
  82. :INIT
  83. output ATQ0V1\13        ; Enable word result codes
  84. chkok {Can't get modem's attention}
  85. ; X6  = Verbose result codes, show modulation speed
  86. ; &C1 = CD follows RS232
  87. ; &D2 = DTR follows RS232
  88. ; &Q0 = Asynchronous data mode, use AT command set
  89. ; L0  = Low speaker volume
  90. output AAAT E1 X6 &C1 &D2 &Q0 L0\13
  91. chkok {Can't initialize modem}
  92. output AT \92Q3\13        ; RTS/CTS hardware flow control
  93. chkok {Can't enable RTS/CTS}    ; On modem
  94. wait 5 cts
  95. if fail errfail {Modem is not asserting CTS!}
  96. set flow rts/cts        ; And in Kermit too, but only now
  97. pause 2                ; This is needed for internal model
  98. output AT %B14400 S78=0\13      ; Modulation = V.32bis with fallback
  99. chkok {Can't enable modulation fallback}
  100. output AT \92N7%C1\13        ; Compression and EC enabled
  101. chkok {Can't enable compression and EC}
  102. output AT \92K5\13        ; Make modem pass BREAK transparently
  103. chkok {Can't become transparent to BREAK}
  104.  
  105. if def \%1 if not equal "\%1" "=" goto BEGIN
  106. echo Modem initialization complete, no number to dial
  107. end 0
  108.  
  109. :BEGIN                ; Now DIAL.
  110. clear                ; Clear INPUT buffer.
  111. set count 5                     ; Dialing retry counter, 5 tries allowed.
  112. echo Dialing \%1 on \v(line) at \v(speed) bps, wait...
  113. echo
  114. pause 1
  115. goto dial                       ; 1st time, skip pause and Redialing message
  116.  
  117. :REDIAL
  118. set alarm 30
  119. pause 30            ; Wait 30 seconds before redialing.
  120. if not alarm errfail {Dialing canceled.}
  121. echo Redialing...               ; Message for redialing.
  122. pause 1
  123.  
  124. :DIAL
  125. output ATD\%1\13                ; Dial the number.
  126. set alarm 90            ; (For detecting keyboard interruptions.)
  127. if > VERSION 312 clear input    ; Clear echo from INPUT buffer.
  128. if < VERSION 313 clear
  129. input 30 \10                    ; Wait for the linefeeds...
  130.  
  131. :GETMSG
  132. input 60 \10            ; ...that surround the response message.
  133. if success goto gotmsg        ; Got a message.
  134. if alarm errfail {No response from modem.} ; No response in 90 seconds.
  135. hangup                ; User interrupted from keyboard,
  136. output \13            ; cancel dialing by sending carriage return,
  137. goto again            ; and go try again right away.
  138.  
  139. :GOTMSG
  140. reinput 1 CONNECT               ; Got a message, was it CONNECT?
  141. if success goto done            ; If so, we're done.
  142. reinput 1 BUSY            ; Line is busy.
  143. if success goto busy        ; Go wait a while and then dial again.
  144. reinput 1 ERROR            ; Command syntax error.
  145. if success errfail {Dialing command error}
  146. reinput 1 NO CARRIER        ; Phone didn't answer or no carrier.
  147. if success errfail {No answer or no carrier}
  148. reinput 1 NO ANSWER        ; No answer
  149. if success errfail {No answer - try again later}
  150. reinput 1 NO DIALTONE        ; No dialtone when phone taken off hook.
  151. if success errfail {No dialtone - Is your modem connected to the phone line\63}
  152. goto getmsg            ; None of the above, get another message.
  153.  
  154. :BUSY
  155. if < \v(count) 2 goto quit    ; Don't wait 30 seconds if tries are used up.
  156. Echo Line is busy, will dial again in 30 seconds.
  157. echo Press any key to cancel...
  158. output \13            ; CR cancels dialing
  159. hangup                          ; Hang up.
  160. :AGAIN
  161. if count goto redial            ; Then go redial.
  162. :QUIT
  163. errfail {It never answers!  I give up.} ; Too many tries.
  164.  
  165. :DONE                           ; Connected.
  166. echo \7                         ; Celebrate with a beep.
  167. define errfail            ; Erase local macro definitions...
  168. end 0                ; Finished, return success code.
  169.  
  170. :FAIL                ; Dialing failed, no beep.
  171. define errfail            ; Erase local macro definitions...
  172. end 1                ; Return failure code.
  173.  
  174. ; End of DPXPRESS.SCR